10 research outputs found

    Explicit Substitutions for Contextual Type Theory

    Get PDF
    In this paper, we present an explicit substitution calculus which distinguishes between ordinary bound variables and meta-variables. Its typing discipline is derived from contextual modal type theory. We first present a dependently typed lambda calculus with explicit substitutions for ordinary variables and explicit meta-substitutions for meta-variables. We then present a weak head normalization procedure which performs both substitutions lazily and in a single pass thereby combining substitution walks for the two different classes of variables. Finally, we describe a bidirectional type checking algorithm which uses weak head normalization and prove soundness.Comment: In Proceedings LFMTP 2010, arXiv:1009.218

    Functional programming with logical frameworks

    No full text
    Logical frameworks are languages used to represent information. In this dissertation we present the Delphin programming language, which is a functional programming language with a logical framework supporting both higher-order abstract syntax and dependent types. Higher-order abstract syntax, or HOAS, refers to the technique of representing variables of an object language using variables of a meta-language, which leads to more concise and elegant encodings than first, order alternatives. Dependent types allow one to represent complex data (such as derivations in various logics) and enforce more properties of programs than possible using only simple types. Delphin is not only a useful programming language but also a useful system for formalizing proofs as total functions express proofs that the input entails the output. Just as representations using HOAS free the programmer from concerns of handling explicit contexts and substitutions, our system permits computation and reasoning over such encodings without making these constructs explicit, leading to concise and elegant programs. Delphin is a two-level system distinguishing functions used for representation from functions expressing computation. The ability to perform computation over higher-order data is driven by a construct allowing the dynamic introduction of scoped constants, which we call parameters. We motivate our system with examples of translating derivations between logics and converting between higher-order and first-order representations of data. The Delphin website can be reached at http://www.delphin.logosphere.org

    Practical Programming with Higher-Order Encodings and Dependent Types

    No full text
    Abstract. Higher-order abstract syntax (HOAS) refers to the technique of representing variables of an object-language using variables of a meta-language. The standard first-order alternatives force the programmer to deal with superficial concerns such as substitutions, whose implementation is often routine, tedious, and error-prone. In this paper, we describe the underlying calculus of Delphin. Delphin is a fully implemented functional-programming language supporting reasoning over higher-order encodings and dependent types, while maintaining the benefits of HOAS. More specifically, just as representations utilizing HOAS free the programmer from concerns of handling explicit contexts and substitutions, our system permits programming over such encodings without making these constructs explicit, leading to concise and elegant programs. To this end our system distinguishes bindings of variables intended for instantiation from those that will remain uninstantiated, utilizing a variation of Miller and Tiu’s ∇-quantifier [1].

    Factoring Proofs

    No full text
    Logic programs, when total, realize proofs via a realizability interpretation similar to the Curry Howard isomorphism. The challenge in statically deciding totality lies in checking for termination and for coverage. For Elf logic programs, sophisticated algorithms exist for both problems. However, those solutions only apply to a much smaller subset of logic programs than a programmer is typically inclined to write. Often programs have to be rewritten to accommodate the idiosyncrasies of the coverage checker that cannot handle logic programs that backtrack. Factoring is a semantic preserving program transformation technique that removes backtracking from logic programs and renders them coverage checkable

    The ∇-calculus. Functional programming with higher-order encodings

    No full text
    Abstract. Higher-order encodings use functions provided by one language to represent variable binders of another. They lead to concise and elegant representations, which historically have been difficult to analyze and manipulate. In this paper we present the ∇-calculus, a calculus for defining general recursive functions over higher-order encodings. To avoid problems commonly associated with using the same function space for representations and computations, we separate one from the other. The simply-typed λ-calculus plays the role of the representation-level. The computationlevel contains not only the usual computational primitives but also an embedding of the representation-level. It distinguishes itself from similar systems by allowing recursion under representation-level λ-binders while permitting a natural style of programming which we believe scales to other logical frameworks. Sample programs include bracket abstraction, parallel reduction, and an evaluator for a simple language with first-class continuations.

    Functional programming with λλ-tree syntax

    No full text
    International audienceWe present the design of a new functional programming language, MLTS, that uses the λλ-tree syntax approach to encoding bindings appearing within data structures. In this approach, bindings never become free nor escape their scope: instead, binders in data structures are permitted to move to binders within programs. The design of MLTS includes additional sites within programs that directly support this movement of bindings. In order to formally define the language's operational semantics, we present an abstract syntax for MLTS and a natural semantics for its evaluation. We shall view such natural semantics as a logical theory within a rich logic that includes both nominal abstraction and the ∇∇-quantifier: as a result, the natural semantics specification of MLTS can be given a succinct and elegant presentation. We present a typing discipline that naturally extends the typing of core ML programs and we illustrate the features of MLTS by presenting several examples. An on-line interpreter for MLTS is briefly described
    corecore